﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbControl
{
    [Index("uk_id", nameof(id), true)]
    public class sensors
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int id { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_code { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_name { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_sn { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string gateway_id { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_type { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_mode { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_topic { get; set; }
        [Column(DbType = "nvarchar(50)")]
        public string sensor_subscribe { get; set; }
        public int? flag { get; set; }
        public int? online_status { get; set; }
    }
}
